﻿namespace Example
{
    using System;

    using FluentAutomation.API;
    using FluentAutomation.API.Enumerations;

    using Xunit;

    public sealed class AlanDeanFacts : FluentTest
    {
        [Fact(Skip = "OpenQA.Selenium.WebDriverException : No response from server for url http://localhost:23175/session")]
        public void chrome()
        {
            const string title = "Alan Dean";

            I.Record();

            I.Open(new Uri("http://www.alan-dean.com/about"));
            I.Wait(2);
            I.Expect.Text(title).In("title");
            I.Expect.Text(title.ToUpperInvariant()).In("#title");

            I.Execute(BrowserType.Chrome);
        }

        [Fact]
        public void firefox()
        {
            I.Record();

            const string title = "Alan Dean";

            I.Open(new Uri("http://www.alan-dean.com/about"));
            I.Wait(2);
            I.Expect.Text(title).In("title");
            I.Expect.Text(title.ToUpperInvariant()).In("#title");

            I.Execute(BrowserType.Firefox);
        }
    }
}